<div class="typeOfServices view">
<h2><?php  __("Type Of Service");?></h2>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __("Id"); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $typeOfService['TypeOfService']['id']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __("Name"); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $typeOfService['TypeOfService']['name']; ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php __("Actions"); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__("Edit Type Of Service", true), array('action' => 'edit', $typeOfService['TypeOfService']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__("Delete Type Of Service", true), array('action' => 'delete', $typeOfService['TypeOfService']['id']), null, sprintf(__("Are you sure you want to delete # %s?", true), $typeOfService['TypeOfService']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__("List Type Of Services", true), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__("New Type Of Service", true), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__("List Customers", true), array('controller' => 'customers', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__("New Customer", true), array('controller' => 'customers', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__("List Orders", true), array('controller' => 'orders', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__("New Order", true), array('controller' => 'orders', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php __("Related Customers");?></h3>
	<?php if (!empty($typeOfService['Customer'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __("Id"); ?></th>
		<th><?php __("User Id"); ?></th>
		<th><?php __("First Name"); ?></th>
		<th><?php __("Last Name"); ?></th>
		<th><?php __("Address"); ?></th>
		<th><?php __("Address cd."); ?></th>
		<th><?php __("City"); ?></th>
		<th><?php __("State"); ?></th>
		<th><?php __("Phone1"); ?></th>
		<th><?php __("Phone2"); ?></th>
		<th><?php __("Phone3"); ?></th>
		<th><?php __("Phone4"); ?></th>
		<th><?php __("Type Of Service Id"); ?></th>
		<th><?php __("Types Of Spaces Id"); ?></th>
		<th><?php __("Registration Date"); ?></th>
		<th><?php __("Note"); ?></th>
		<th class="actions"><?php __("Actions");?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($typeOfService['Customer'] as $customer):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $customer['id'];?></td>
			<td><?php echo $customer['user_id'];?></td>
			<td><?php echo $customer['name'];?></td>
			<td><?php echo $customer['surname'];?></td>
			<td><?php echo $customer['address1'];?></td>
			<td><?php echo $customer['address2'];?></td>
			<td><?php echo $customer['address3'];?></td>
			<td><?php echo $customer['address4'];?></td>
			<td><?php echo $customer['phone1'];?></td>
			<td><?php echo $customer['phone2'];?></td>
			<td><?php echo $customer['phone3'];?></td>
			<td><?php echo $customer['phone4'];?></td>
			<td><?php echo $customer['type_of_service_id'];?></td>
			<td><?php echo $customer['types_of_spaces_id'];?></td>
			<td><?php echo $customer['registration_date'];?></td>
			<td><?php echo $customer['note'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__("View", true), array('controller' => 'customers', 'action' => 'view', $customer['id'])); ?>
				<?php echo $this->Html->link(__("Edit", true), array('controller' => 'customers', 'action' => 'edit', $customer['id'])); ?>
				<?php echo $this->Html->link(__("Delete", true), array('controller' => 'customers', 'action' => 'delete', $customer['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $customer['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__("New Customer", true), array('controller' => 'customers', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __("Related Orders");?></h3>
	<?php if (!empty($typeOfService['Order'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __("Id"); ?></th>
		<th><?php __("Customer Id"); ?></th>
		<th><?php __("Type Of Service Id"); ?></th>
		<th><?php __("Types Of Spaces Id"); ?></th>
		<th><?php __("Type Of Performance Id"); ?></th>
		<th><?php __("Status Of Implementation"); ?></th>
		<th><?php __("Payment Status"); ?></th>
		<th><?php __("Estimated Execution Time"); ?></th>
		<th><?php __("Value Of The Order"); ?></th>
		<th><?php __("Name"); ?></th>
		<th class="actions"><?php __("Actions");?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($typeOfService['Order'] as $order):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $order['id'];?></td>
			<td><?php echo $order['customer_id'];?></td>
			<td><?php echo $order['type_of_service_id'];?></td>
			<td><?php echo $order['types_of_spaces_id'];?></td>
			<td><?php echo $order['type_of_performance_id'];?></td>
			<td><?php echo $order['status_of_implementation'];?></td>
			<td><?php echo $order['payment_status'];?></td>
			<td><?php echo $order['estimated_execution_time'];?></td>
			<td><?php echo $order['value_of_the_order'];?></td>
			<td><?php echo $order['name'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__("View", true), array('controller' => 'orders', 'action' => 'view', $order['id'])); ?>
				<?php echo $this->Html->link(__("Edit", true), array('controller' => 'orders', 'action' => 'edit', $order['id'])); ?>
				<?php echo $this->Html->link(__("Delete", true), array('controller' => 'orders', 'action' => 'delete', $order['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $order['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__("New Order", true), array('controller' => 'orders', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
